﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using V5_Common;
using System.Text;

namespace V5_EShop.Admin {
    public partial class Admin_Index_Left : System.Web.UI.Page {
        protected void Page_Load(object sender, EventArgs e) {
            if (!this.IsPostBack) {
                string menu = InputHelper.SetString(Request["type"]);
                switch (menu.ToLower()) {
                    case "product":
                        Bind_Admin_GZProduct();    
                    //Bind_Product();
                        break;
                    case "config":
                        Bind_Config();
                        break;
                    case "content":
                        Bind_Article();
                        break;
                    case "user":
                        Bind_Admin_User();
                        break;
                    case "template":
                        //Bind_Admin_Template();
                        Bind_GZPorductOrder();
                        break;
                    default:
                        Bind_Admin_GZProduct();
                        break;
                }
            }
        }

        private void Bind_GZPorductOrder() {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<ul>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""GZProductOrder/Admin_ProductOrder.aspx"" target=""main"">产品订单管理</a></li>");
            sb.Append(@"</ul>");
            this.menu1.Text = sb.ToString();
        }

        private void Bind_Product() {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<ul>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href='admin_menu_product_class.aspx' target='menu'>产品管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Product/Admin_ProductClass.aspx"" target=""main"">产品分类管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Product/Admin_ProductComment.aspx"" target=""main"">产品评论管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""ProductExpand/Admin_ProductFieldClass.aspx"" target=""main"">产品属性</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""ProductExpand/Admin_ProductBrand.aspx"" target=""main"">品牌管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""ProductExpand/Admin_ProductAskAnswer.aspx"" target=""main"">问答管理</a></li>");
            sb.Append(@"</ul>");
            this.menu1.Text = sb.ToString();
        }

        private void Bind_Config() {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<ul>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Tools/Admin_Config.aspx"" target=""main"">网站配置</a></li>");
            //sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Tools/Admin_Announce.aspx"" target=""main"">公告管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Tools/Admin_Friend.aspx"" target=""main"">友情链接</a></li>");
            //sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Tools/Admin_HotKeyWord.aspx"" target=""main"">热门关键字</a></li>");
            sb.Append(@"</ul>");
            this.menu1.Text = sb.ToString();
        }

        private void Bind_Article() {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<ul>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Article/Admin_Article.aspx"" target=""main"">新闻公告</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Article/Admin_ArticleClass.aspx"" target=""main"">新闻分类管理</a></li>");
            //sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Article/Admin_ArticleComment.aspx"" target=""main"">文章评论管理</a></li>");
            sb.Append(@"</ul>");
            sb.Append(@"<ul>");
            //sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""DiyPage/Admin_DiyPage.aspx"" target=""main"">单页列表</a></li>");
            //sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""DiyPage/Admin_DiyPageClass.aspx"" target=""main"">单页分类管理</a></li>");
            sb.Append(@"</ul>");
            this.menu1.Text = sb.ToString();
        }

        private void Bind_Admin_User() {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<ul>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""GZProductUser/Admin_User.aspx"" target=""main"">客户管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""GZProductUser/Admin_UserClass.aspx"" target=""main"">客户等级管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin/Admin_Admin.aspx"" target=""main"">管理员管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin/Admin_Admin.aspx"" target=""main"">修改密码</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Admin_Logout.aspx"" target=""main"">退出系统</a></li>");
            sb.Append(@"</ul>");
            this.menu1.Text = sb.ToString();
        }


        private void Bind_Admin_Template() {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<ul>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Template/Admin_TemplateSelect.aspx"" target=""main"">模板管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""Html/Admin_Html.aspx"" target=""main"">生成静态</a></li>");
            sb.Append(@"</ul>");
            this.menu1.Text = sb.ToString();
        }

        private void Bind_Admin_GZProduct() {
            StringBuilder sb = new StringBuilder();
            sb.Append(@"<ul>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href='GZProduct/Admin_Product.aspx' target='main'>产品管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""GZProduct/Admin_ProductClass.aspx"" target=""main"">产品分类管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""GZProduct/Brand/Admin_Brand.aspx"" target=""main"">产品品牌管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""GZProduct/Unit/Admin_Unit.aspx"" target=""main"">产品单位管理</a></li>");
            sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""GZProduct/PackageUnit/Admin_PackageUnit.aspx"" target=""main"">产品包装单位管理</a></li>");
            //sb.Append(@"<li><img src='css/menu_dot_21.gif' alt='' border='0' /><a class='menulist' href=""GZProduct/ProviderType/Admin_ProviderType.aspx"" target=""main"">产品供应商管理</a></li>");
            
            sb.Append(@"</ul>");
            this.menu1.Text = sb.ToString();
        }
    }
}
